<template>
	<view class="detail">
		<view class="detail-title">
			{{detail.title}}
		</view>
		<view class="detail-content" v-html="detail.detail"></view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				detail:{}
			};
		},
		onLoad(option){
			if(option.typeid){
				this.initData(option.typeid)
			}
		},
		methods:{
			initData(para){
				this.$u.api.problemDetail({id:para})
				.then(res=>{
					if(res.status){
						this.detail = res.msg
						uni.setNavigationBarTitle({
							title:res.msg.title
						})
						return
					}
					uni.showToast({
						icon: 'none',
						title: res.msg
					})
				})
				.catch(err=>{console.log(err);})
			}
		}
		
	}
</script>

<style lang="less">
	// @import url('@/common/css/comm.less');
	page{
		background-color: #fff;
	}
	.detail{
		padding:0 30rpx;
	}
	.detail-title{
		padding:30rpx 0;
		border-bottom:1px solid #EEEEEE;
		font-size:30rpx;
	}
	.detail-content{
		padding:20rpx;
		font-size:24rpx;
		color:#999999;
	}

</style>
